﻿using System.ComponentModel;
using System.Windows.Controls;
using MyFloridaHouse.libSvOpenDistricts.enumerations;
using System.Collections.ObjectModel;
using MyFloridaHouse.libSvDTO;
using System.Collections.Generic;
using MyFloridaHouse.libSvOpenDistricts.PDF;

namespace MyFloridaHouse.libSvOpenDistricts.Dialogs
{
    public class DistrictPlanPrintPdfDlg : _BaseDlg
    {
            private DistrictPlanPrintPdfDlgView dlgWindow = new DistrictPlanPrintPdfDlgView();


            public DistrictPlanPrintPdfDlg(PropertyChangedEventHandler propertyChangedEventHandler, StackPanel childWindowStackPanel, string planTitle, int districtCount, BoundingBoxDTO currentViewBoundingBox)
            {
                if (null == planTitle)
                {
                    planTitle = string.Empty;
                }
                PDFPrintDistricttPlanTitle = planTitle;
                this.currentViewBoundingBox = currentViewBoundingBox;
                InitializeDlgWindow(propertyChangedEventHandler, childWindowStackPanel, dlgWindow);
            }

            #region form data properties


            private HouseMapRegions _houseMapRegions = new HouseMapRegions();
            public HouseMapRegions houseMapRegions
            {
                get { return _houseMapRegions; }
                set
                {
                    if (_houseMapRegions != value)
                    {
                        _houseMapRegions = value;
                        NotifyPropertyChanged("houseMapRegions");
                    }
                }
            }

            private int _PDFregionListSelectedIndex = 0;
            public int PDFregionListSelectedIndex
            {
                get { return _PDFregionListSelectedIndex; }
                set
                {
                    if (_PDFregionListSelectedIndex != value)
                    {
                        _PDFregionListSelectedIndex = value;
                        NotifyPropertyChanged("PDFregionListSelectedIndex");
                    }
                }
            }

            public enumHouseMapRegions PDFregionListSelectedValue
            {
                get { return houseMapRegions.regionList[PDFregionListSelectedIndex].region; }
            }

        private BoundingBoxDTO _currentViewBoundingBox;
            public BoundingBoxDTO currentViewBoundingBox
            {
                get { return _currentViewBoundingBox; }
                set
                {
                    if (_currentViewBoundingBox != value)
                    {
                        _currentViewBoundingBox = value;
                        NotifyPropertyChanged("currentViewBoundingBox");
                    }
                }
            }

            private int _selectedDistrict = 1;
            public int selectedDistrict
            {
                get { return _selectedDistrict; }
                set
                {
                    if (_selectedDistrict != value)
                    {
                        _selectedDistrict = value;
                        NotifyPropertyChanged("selectedDistrict");
                    }
                }
            }

            private enumDistrictPlanPDFPrintMapAreas _selectedDistrictPlanPDFPrintMapArea = enumDistrictPlanPDFPrintMapAreas.STATE;
            public enumDistrictPlanPDFPrintMapAreas selectedDistrictPlanPDFPrintMapArea
            {
                get { return _selectedDistrictPlanPDFPrintMapArea; }
                set
                {
                    if (_selectedDistrictPlanPDFPrintMapArea != value)
                    {
                        _selectedDistrictPlanPDFPrintMapArea = value;
                        NotifyPropertyChanged("selectedDistrictPlanPDFPrintMapArea");
                    }
                }
            }

            private enumDistrictPlanPDFPrintSizes _selectedPlanPDFPrintPaperSize = enumDistrictPlanPDFPrintSizes._8x11;
            public enumDistrictPlanPDFPrintSizes selectedPlanPDFPrintPaperSize
            {
                get { return _selectedPlanPDFPrintPaperSize; }
                set
                {
                    if (_selectedPlanPDFPrintPaperSize != value)
                    {
                        _selectedPlanPDFPrintPaperSize = value;
                        NotifyPropertyChanged("selectedPlanPDFPrintPaperSize");
                    }
                }
            }

            private string _PDFPrintDistricttPlanTitle = "";
            public string PDFPrintDistricttPlanTitle
            {
                get { return _PDFPrintDistricttPlanTitle; }
                set
                {
                    if (_PDFPrintDistricttPlanTitle != value)
                    {
                        _PDFPrintDistricttPlanTitle = value;
                        NotifyPropertyChanged("PDFPrintDistricttPlanTitle");
                    }
                }
            }

            #endregion

     }
}

